const express = require('express');
const app = express();

app.get('/',function(req,res){
   res.cookie('mycookie','hi',{maxAge:1200000,httpOnly:true})
   res.send('已经存入cookie')
})

app.listen(3000, () => {
    console.log('服务器正在监听端口 3000');
  });